﻿''' <summary>
''' クエリキー属性
''' </summary>
''' <remarks></remarks>
Public Class QueryKeyAttribute
    Inherits KeyAttribute

    Public Sub New(ByVal query As String)
        Me.Query = query
    End Sub

    Property Query As String

    Public Overrides Function CreateKeyQueryBeforeSave(trn As System.Data.IDbTransaction) As System.Data.IDbCommand
        Dim cmd As IDbCommand = trn.Connection.CreateCommand
        cmd.Transaction = trn
        cmd.CommandText = Me.Query
        Return cmd
    End Function

End Class
